package classandobj.equal;

public class JavaTypeEqual {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Integer s = new Integer(5);
		Integer t = new Integer(5);
		Integer s1 = Integer.valueOf(5);
		Integer t1 = Integer.valueOf(5);
		
		String str1 = new String("str");
		String str2 = new String("str");
		String str3 = "str";
		String str4 = "str";

		System.out.println("s==t: " + (s == t));
		System.out.println("s.equals(new Integer(5)): " + (s.equals(new Integer(5))));
		System.out.println("s1==t1: " + (s1 == t1));
		
		System.out.println("str1==str2: " + (str1 == str2));
		System.out.println("str3==str4: " + (str3 == str4));
	}

}
